//
//  RuleViewController.m
//  智积分
//
//  Created by apple on 2018/3/26.
//  Copyright © 2018年 Cynic. All rights reserved.
//

#import "RuleViewController.h"
#import <WebKit/WebKit.h>
@interface RuleViewController ()

@end

@implementation RuleViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self ruleviewLoad];
    // Do any additional setup after loading the view.
}

-(void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    if (cx_hit == 812) {
        [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleLightContent;
    }
    else{
        [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleDefault;
    };
}

-(void)viewWillDisappear:(BOOL)animated{
    [super viewWillDisappear:animated];
    if (cx_hit == 812) {
        
    }
    else{
    [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleLightContent;
    }
}

-(void)ruleviewLoad{
    self.view.backgroundColor = bggrayColor;
//    [self setNavigationViewWithTitle:@"关于我们" WithCanPop:YES WithPopData:@"black_return" WithPopisString:NO WithHasRightOperation:NO WithrightOperationData:@"" WithRightisString:NO WithNavigationColor:[UIColor clearColor] withBgView:self.view];
    [self setNavigationViewWithTitle:@"关于我们" WithCanPop:YES WithPopData:@"black_return" WithPopisString:NO WithHasRightOperation:NO WithrightOperationData:@"" WithRightisString:NO WithNavigationColor:[UIColor clearColor] withBgView:self.view];
    self.centerTitle.textColor = [UIColor blackColor];
    WKWebView *webview =[[WKWebView alloc] initWithFrame:CGRectMake(0, cxsingler.topdis + 44  , cx_wid, cx_hit - cxsingler.topdis - cxsingler.bottomdis - 44 - cxsingler.topdis)];
    NSString *filePath = [[NSBundle mainBundle] pathForResource:@"rules" ofType:@"pdf"];
    [webview loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:filePath]]];
    [self.view addSubview:webview];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
